<?php
require_once("./DButil.php");

$arr=$_SESSION["loginTeacher"];

$sql="select v.videoId,v.videoInfo,c.courseName,v.status
from t_video v
left join t_course c on v.courseId=c.courseId
where v.teacherId='{$arr["teacherId"]}'
";
// $result=query($sql);
// print_r($result);
if (query($sql)) {
        $result=query($sql);
    }
else{
    $result = [
        "msg" => "未存在",
        "code" => 404,
        "success" => false,
    ];
}

header("Content-Type:application/json;charset=utf-8");
echo json_encode($result);
?>